#include <iostream>

using namespace std;

//新建一个学生类
class Student{
private:
    //学生类属性
    int sid,age,banji;
    string name,gender,character;
public:
    //获得学号
    void setSid(int sid){
        this->sid=sid;
        }
    //获得姓名
    void setName(string name){
        this->name=name;
        }
    //获得年龄
    void setAge(int age){
        this->age=age;
        }
    //获得班级
    void setBanji(int banji){
        this->banji=banji;
        }
    //获得性别
    void setGender(string gender){
        this->gender=gender;
        }
    //获得性格
    void setCharacter(string character){
        this->character=character;
        }
    //信息概要
    void say(){
        cout<<"My name is "<<name<<".My id is "<<sid<<".I am "<<age<<" years old."<<"I am from class "<<banji<<".I am a "<<character<<" "<<gender<<"."<<endl;
        }
};

int main()
{
    Student stu1,stu2,stu3;//创建三个学生类对象
    stu1.setSid(1001);
    stu1.setName("Frank");
    stu1.setAge(17);
    stu1.setBanji(1);
    stu1.setGender("boy");
    stu1.setCharacter("outgoing");
    stu2.setSid(1002);
    stu2.setName("Jenny");
    stu2.setAge(18);
    stu2.setBanji(2);
    stu2.setGender("girl");
    stu2.setCharacter("optimistic");
    stu3.setSid(1003);
    stu3.setName("Tom");
    stu3.setAge(16);
    stu3.setBanji(3);
    stu3.setGender("boy");
    stu3.setCharacter("energetic");
    stu1.say();
    stu2.say();
    stu3.say();
    return 0;
}
